import random
import MySQL
name="wsq_test"
sex_list = ["男","女"]

def create_data(number):
    for i in range(number):
        sql = "insert into students (name,phone,age,sex) values ('%s','%s','%s','%s');"
        stu_name = "%s_%s" % (name,i)
        phone = random.randint(10000000000,99999999999)
        age = random.randint(1,100)
        sex = random.choice(sex_list)
        sql = sql % (stu_name,phone,age,sex)
        MySQL.execute_sql(sql)

if __name__ == '__main__':
    create_data(1)